<template>
  <div class="backgroundColor container fixed">
    <Header content="安全设置"></Header>
    <ul class="safeUl backgroundColor">
      <!--<li class="flex" @click="goTo({name:'mySetPwd'})">-->
        <!--<div>-->
          <!--支付密码-->
        <!--</div>-->
        <!--<x-icon type="ios-arrow-right"></x-icon>-->
      <!--</li>-->
      <li class="flex" @click="goTo({name:'myEditLoginPwd'})">
        <div>
          登录密码
        </div>
        <x-icon type="ios-arrow-right"></x-icon>
      </li>
    </ul>
  </div>
</template>
<script>
  import Header from '../common/header.vue'
  export default{
    data(){
      return {
        showContent:false,
        userInfo:{},
        setPwdStatus:'设置资金密码',
        currencyList:[],
        onFetching1:false
      }
    },
    methods:{
      loginOut(){
        this.service('logout',{}).then(res=>{
          localStorage.clear();
          this.$router.push('/login');
        })
      },
      goTo(path){
        this.$router.push(path)
      },
      info(){
        var info = JSON.parse(localStorage.getItem('userInfo'));
        this.userInfo = info;
        if(this.userInfo.set_asset_password){
          this.setPwdStatus = '修改资金密码'
        }else{
          this.setPwdStatus = '设置资金密码'
        }
      },
      profit(){
        this.loading(true);
        Promise.all([this.service('accounts',{}),this.service('currency',{})]).then(res=>{
          this.loading(false);
          this.onFetching1 = false;
          this.currencyList = [];
          for(var i = 0;i<res[0].data.length;i++){
            for(var j = 0;j<res[1].data.length;j++){
              if(res[0].data[i].currency_id == res[1].data[j].currency_id){
                var item = res[0].data[i];
                item.max_year_profit = res[1].data[j].max_year_profit;
                item.min_year_profit = res[1].data[j].min_year_profit;
                this.currencyList.push(item);
                break;
              }
            }
          }
        })
      }
    },
    created(){
//      this.onScrollTop();
    },
    components:{
      Header
    }
  }
</script>
<style>
  .vux-x-icon{
    fill:#DCDCDC;
  }
  .safeUl li{
    height: 56px;
    color: #fff;
    padding:0 15px;
    border-bottom: 1px solid #3A3A47;
  }
</style>
